import 'package:animal/constant/color.dart';
import 'package:animal/constant/font.dart';
import 'package:animal/ui/friend/controller/friend_apply_info_controller.dart';
import 'package:animal/utils/screen_util.dart';
import 'package:animal/widgets/HeaderWidget.dart';
import 'package:animal/widgets/appbar_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getwidget/getwidget.dart';

///好友申请详情
class FriendApplyInfoPage extends StatelessWidget {
  FriendApplyInfoPage({Key? key}) : super(key: key);
  final FFriendApplyInfoController controller = Get.put(FFriendApplyInfoController());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBarWidget.defaultAppBar(title: const Text("申请详情"), elevation: 0, backgroundColor: Colors.white),
      body: Column(
        children: [
          Stack(
            alignment: Alignment.topCenter,
            children: [
              Image.asset("images/friend_apply_bg.png", fit: BoxFit.fitWidth),
              Container(margin: EdgeInsets.only(top: ScreenUtil().L(65)), child: Header.defaultHead(radius: 5))
            ],
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: ScreenUtil().L(10)),
            child: Text(
              "张三的锅",
              style: KFontConstant.myTextStyle(size: 14, bold: true, color: KColorConstant.black222),
            ),
          ),
          Text(
            "账号：CK13866333366",
            style: KFontConstant.myTextStyle(size: 12, bold: true, color: KColorConstant.black666666),
          ),
          Container(
            width: double.infinity,
            margin: EdgeInsets.fromLTRB(ScreenUtil().L(15), ScreenUtil().L(10), ScreenUtil().L(15), ScreenUtil().L(20)),
            padding: EdgeInsets.fromLTRB(ScreenUtil().L(15), ScreenUtil().L(12), ScreenUtil().L(15), ScreenUtil().L(12)),
            constraints: BoxConstraints(minHeight: ScreenUtil().L(80)),
            decoration: BoxDecoration(
              color: const Color(0XFFFFF7ED),
              borderRadius: BorderRadius.circular(ScreenUtil().L(5)),
            ),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(
                  "张三的锅：我是张三的锅，加我加我 ",
                  style: KFontConstant.myTextStyle(
                    size: 12,
                  ),
                )
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: ScreenUtil().L(15), left: ScreenUtil().L(15), right: ScreenUtil().L(15)),
            padding: EdgeInsets.only(bottom: ScreenUtil().L(10), left: ScreenUtil().L(25), right: ScreenUtil().L(25)),
            decoration: BoxDecoration(border: Border(bottom: BorderSide(width: ScreenUtil().L(0.5), color: KColorConstant.lineE5E5E5))),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(
                  "来源",
                  style: KFontConstant.myTextStyle(size: 14, color: KColorConstant.black222),
                ),
                Text(
                  "查找讯号/手机号",
                  style: KFontConstant.myTextStyle(size: 14, color: KColorConstant.black222),
                ),
              ],
            ),
          ),
          Container(
            height: ScreenUtil().L(30),
          ),
          CupertinoButton(
            child: Text(
              "通过申请",
              style: KFontConstant.myTextStyle(size: 16, color: Colors.white),
            ),
            onPressed: () {},
            borderRadius: BorderRadius.circular(ScreenUtil().L(5)),
            color: KColorConstant.btnColorF8633B,
            padding: EdgeInsets.symmetric(horizontal: ScreenUtil().L(125), vertical: ScreenUtil().L(15)),
          ),Container(
            margin: EdgeInsets.symmetric(horizontal: ScreenUtil().L(100)),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
              GFButton(onPressed: (){},text: "加入黑名单",textStyle: KFontConstant.myTextStyle(size: 14,bold: true),type: GFButtonType.transparent,),
              Container(margin:EdgeInsets.only(left: ScreenUtil().L(10)),height: ScreenUtil().L(20),width: ScreenUtil().L(1),color: KColorConstant.lineE5E5E5,),
              GFButton(onPressed: (){},text: "拒绝",textStyle: KFontConstant.myTextStyle(size: 14,bold: true),type: GFButtonType.transparent,),
            ],),
          )
        ],
      ),
    );
  }
}
